CC = gcc
CXX = g++ -g -Wall -Werror
AR = ar

LDFLAGS += -rdynamic

PYTHON_INCLUDE = /usr/include/python2.3
PYTHON_LIB = -L/usr/lib -lpython2.3
SWIG = swig

%_python_wrap.o: %_python_wrap.cc
	$(CXX) $(CXXFLAGS) $(INCS) -I$(PYTHON_INCLUDE) $(SWIG_INCLUDE) -c $< -o $@

%_python_wrap.cc: %.swig
	$(SWIG) $(SWIG_INCLUDE) -o $@ -c++ -python $<
	
%.pp: %.cc
	$(CXX) $(CXXFLAGS) $(INCS) -E $< > $@

%.o: %.cc
	$(CXX) $(CXXFLAGS) $(INCS) -c $<

%_moc.cc: %.h
	 moc $< > $@
	 
%.tsk: %.o
	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) $(OTHER_LIBS)
